const now = new Date();
 console.log(now);
 function Rectangle(name, width, height) {
  this.name = name; 
 
 this.width = width;
 this.height = height; 
 }
 const rect2 = Rectangle("矩形2", 20, 20);
console.log(rect2); 
function Rectangle(name, width, height) {
this.name = name;
this.width = width;
this.height = height;
this.area = function () {
return this.width * this.height;
};
}
const rect1 = new Rectangle(" 矩形1", 10, 10);
console.log(rect1.area()); // 输出：
const rect2 = new Rectangle("矩形2", 20, 10);
const rect3 = new Rectangle("矩形3", 30, 30);
   console.log(rect2.name); // 输出：矩形2
   console.log(rect3.area()); // 输出：900

   console.log(rect1.constructor);// 输出：[Function: Rectangle]
   console.log(rect2 instanceof Rectangle); 
    console.log(rect3 instanceof Date);      
 
